﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace HitachiApp.Model.Utils
{
    public class SortableObservableCollection<T> : ObservableCollection<T>
    {
        public void Sort(Comparison<T> c)
        {
            List<T> l = new List<T>(Items);
            l.Sort(c);
            Items.Clear();
            foreach (T t in l)
            {
                Items.Add(t);
            }
        }
    }
}
